How To Access Virtual Machine From Local Network?

544 Views
0 rating based on 0 reviews

How to Access Virtual Machine from Local Network? You have a Windows computer installed with Hyper-v and can access it easily from the internet, however, you may not know how to access it over the network from a machine in your own network. Here is an example of accessing virtual machine from different PC connected in the same network.

Access Virtual Machine from Local Network

A Virtual Machine (VM) can help you create a virtual platform where you can install different operating systems and perform various tasks. However, when you have a VM software installed, and if the VM has an operating system installed, it will not be connected to the local network by default.

If it is not connected to the local network, it cannot be accessed by that network. So to access a VM from the local network, you have to set up this manually. In this article, I will show you how you can connect VM to a local network so that that network can access it.

Connecting VM to Local Network

Here I am using the “VMware Workstation Pro 15.0” and a Windows 7 virtual machine. I have already installed and created the Windows 7 machine.

However, before launching the VMware software, you have to check your current network addresses, which you will need later. For this:

  1. Launch the command prompt. (It is better to launch it in administrator mode).
  2. Type “ipconfig” and hit enter.
  3. You will find IPv4, Default Gateway, Subnet Mask addresses.IP address of a computer

After noting down the above addresses:

  1. Launch the VMware software.
  2. Click on the machine you want to open from the left panel (Windows 7).
  3. Click on the “Edit virtual machine settings” option.
  4. From the left panel, click on “Network Adapter.
  5. Under the “Network connection” section, choose “Bridged: Connected directly….”
  6. Click on “Ok” to save these settings.network connections settings in VMware

Now click “Power on this virtual machine” to open the virtual Windows 7. This OS will get an IP address by default, but it won’t be the same as the local network. To check:

  1. Open the “Control Panel” in the virtual machine.
  2. Then go to “Network and Sharing Center”.
  3. From the left panel, open “Change adapter settings”.
  4. An adapter named “Local Area Connection” should be there.
  5. Double click on it and then click on “Details”.default network addresses in a VM

It will show you all the network addresses, including IPv4. You will notice that these are not the same as your local network addresses. 

At this point, if you run the command prompt and enter the command “ping (your default gateway address),” it will not respond because it is not yet connected to the local network.

  1. To change this IP address to your local address,
  2. Double click on “Local Area Connection” and then open the “Properties”.
  3. Now double click on “Internal Protocol Version 4 (TCP/IPv4)” to open its properties.
  4. Then check the “Use the following IP address box”.
  5. In the designated fields, enter your local addresses, as you have noted before.
  6. Now click “Ok” in the properties windows and then “Close” the Local Area Connection Status windows.the network addresses to local address in VM

After changing the network addresses, rerun the command and type the “ping” command like before to check. You will now get the response. If you use the “ipconfig” command, you will see that the network addresses are the same as the local address.

Accessing VM from Local Network

Now that you are connected to the local network, you can enter the virtual machine using the local network. In VMware, 

  1. Click on the “Connect to a Remote Server” option.
  2. Put the IP address in the “Server name” field.
  3. Fill the rest of the fields as asked and click on “Connect”.Accessing the virtual machine from the local network

Note that: I have shown how to change the network addresses for windows 7. It will vary for other operating systems, and you will have to adjust accordingly.

Summary: Access Virtual Machine from Local Network

  • Start the virtual machine.
  • Configure network settings in the host operating system.
  • Configure network settings in the virtual machine.
  • You can now access your virtual machine from your local network.